@extends('layouts.admin.admin_master')

@section('content')
  <section class="content-header">
    <h1>
      店铺设置
      <small>基础设置</small>
    </h1>
    <ol class="breadcrumb">
      <li><a href="#"><i class="fa fa-dashboard"></i> Level</a></li>
      <li class="active">Here</li>
    </ol>
  </section>

  <!-- Main content -->
  <section class="content">
    <div class="row">
      <div class="col-md-12">
        <!-- Horizontal Form -->
        <div class="box box-info">
          <div class="box-header with-border">
            <h3 class="box-title">店铺基本设置</h3>
          </div>
          <!-- /.box-header -->
          <!-- form start -->
          <form class="form-horizontal" method="post" enctype="multipart/form-data" action="{{ url('admin/shop') }}">
            {{ csrf_field() }}
            <div class="box-body">
              <div class="form-group">
                <label for="product_name" class="col-sm-2 control-label">店铺名称</label>
                <div class="col-sm-10">
                  <input type="text" id="product_name" name="shop_name" value="{{ $settings->shop_name }}" class="form-control" placeholder="请输入名称">
                </div>
              </div>
              <div class="form-group">
                <label for="product_name" class="col-sm-2 control-label">logo</label>
                <div class="col-sm-10">
                  <input type="file" id="logo" name="logo" value="{{ $settings->logo }}" placeholder="Enter ...">
                </div>
              </div>
              <div class="form-group">
                <label for="product_name" class="col-sm-2 control-label">店铺地址</label>
                <div class="col-sm-10">
                  <input type="input" readonly name="shop_url" value="{{ url('/shop/'.$settings->shop_id)}}"  class="form-control">
                </div>
              </div>
            </div>
            <!-- /.box-body -->
            <div class="box-footer text-right">
            <button type="reset" class="btn btn-default">取消</button>
            <button type="submit" class="btn btn-info">保存</button>
            </div>
            @if (count($errors) > 0)
                <div class="alert alert-danger">
                    <ul>
                        @foreach ($errors->all() as $error)
                            <li>{{ $error }}</li>
                        @endforeach
                    </ul>
                </div>
            @endif
            @if (session('success'))
                <div class="alert alert-success">
                    {{ session('success') }}
                </div>
            @endif
            <!-- /.box-footer -->
          </form>
        </div>
        <!-- /.box -->
      </div>
    </div>
  </section>
@endsection